import request from '@/utils/request'
import qs from "qs";

// 查询单页内容列表
export function listSinglepage() {
  return request({
    url: "/system/singlepage/detail",
    method: "get",
  });
}

// 查询单页内容详细
export function getSinglepage(id) {
  return request({
    url: "/system/singlepage/" + id,
    method: "get",
  });
}

// 新增单页内容
export function addSinglepage(data) {
  return request({
    url: "/system/singlepage",
    method: "post",
    data: qs.stringify(data),
    headers: {
      "content-type": "application/x-www-form-urlencoded",
    },
  });
}

// 修改单页内容
export function updateSinglepage(data) {
  return request({
    url: "/system/singlepage",
    method: "put",
    data: qs.stringify(data),
    headers: {
      "content-type": "application/x-www-form-urlencoded",
    },
  });
}

// 删除单页内容
export function delSinglepage(id) {
  return request({
    url: "/system/singlepage/" + id,
    method: "delete",
  });
}
